﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Medianamik.Core;

namespace Medianamik.UI.Mediasend.Logic
{
    public class Configuration : Singleton<Configuration>
    {
        public NodeTypes.MediasendConfiguration Properties { get; private set; }

        public Configuration()
        {
            SetMediasendConfigurationNode();
        }

        /// <summary>
        /// Initialiser la propriété MediasendManagement
        /// </summary>
        private void SetMediasendConfigurationNode()
        {
            Properties = NodeManager.GetNode<NodeTypes.MediasendConfiguration>(NodeTypes.MediasendConfiguration.NodeId);
        }

        /// <summary>
        /// En cas de changement au niveau de la configuration Mediasend.
        /// </summary>
        public void Reset()
        {
            SetMediasendConfigurationNode();
        }
    }
}
